package edu.pku.sei.transformation.qvt.adapter.mediniqvt;

import edu.pku.sei.transformation.editor.model.pattern.Pattern;
import edu.pku.sei.transformation.editor.model.variable.ObjectVariable;
import edu.pku.sei.transformation.qvt.adapter.standardqvt.ObjectTemplateAdapter;
import edu.pku.sei.transformation.qvt.adapter.standardqvt.PatternAdapter;

public class MediniQVTPatternAdapter extends PatternAdapter {

	public MediniQVTPatternAdapter(Pattern p) {
		super(p);
	}
	
	
	@Override
	protected void addNodes() {
		for (Object o : this.element.getNodes()) {
			if (o instanceof ObjectVariable) {
				ObjectVariable v = (ObjectVariable) o;
				nodes.add(new MediniQVTObjectTemplateAdapter(v));
			} else {
				// comment, text template
			}
		}
	}
}
